package instructions;

import memory.Memory;
import Computer.ProgramCounter;

public class Jump implements Instruction {
	private int jumpTo;
	public Jump(int jumpTo){
		this.jumpTo = jumpTo;
	}
	public void execute(Memory memory, ProgramCounter counter) {
		counter.setCounter(jumpTo);
	}
	
	public String toString(){
		return "JMP " + jumpTo +"\n";
	}

}
